// 居中
@mixin flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
// 文本省略号
@mixin text-ellipsis($lines: 1) {
  @if $lines == 1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
// 清除浮动
@mixin clearfix {
  &::after {
    content: '';
    display: table;
    clear: both;
  }
}
// 响应式
@mixin responsive($breakpoint) {
  @if $breakpoint == 'sm' {
    @media (max-width: 600px) {
      @content;
    }
  } @else if $breakpoint == 'md' {
    @media (max-width: 900px) {
      @content;
    }
  } @else if $breakpoint == 'lg' {
    @media (max-width: 1200px) {
      @content;
    }
  }
}
// 宽高一致
@mixin square($size) {
  width: $size;
  height: $size;
}
